# Maintainer: David Runge <dvzrv@archlinux.org>

_name=pysequoia
pkgname=python-pysequoia
pkgver=0.1.21
pkgrel=1
pkgdesc="Provides OpenPGP facilities in Python through the Sequoia PGP library"
arch=(loong64 x86_64)
url="https://github.com/wiktor-k/pysequoia"
license=(Apache-2.0)
groups=(sequoia)
depends=(
  bzip2
  gcc-libs
  glibc
  gmp
  nettle
  openssl
  pcsclite
  python
)
makedepends=(
  clang
  python-build
  python-installer
  python-maturin
  python-wheel
)
source=($_name-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz)
sha512sums=('1c4f38096c04fe7d1c76993f4c3c27dc3c2c4d89022d67731a8a5312b25b37aca79f0e591d1e388fa2a5b63d7d599c4ee116c0f5a124bd709bb1ff0155d8c1dc')
b2sums=('ee28bfbe28bfdb824cfea74cc02091a43b95586d8fcefab93a8e0b356018907fd84ad3550408b820c62a19f8837d06c1deabb20b6a4f03dddd89cc33f84013ee')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgnam/"
}
